import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import UserAccount from '../views/UserView.vue'
import UserAccount2 from '../views/UserView2.vue'
import AccountInfo from '@/views/group/user/UserView.vue'
import DisplayInfo from '@/views/group/display-info/DisplayInfo.vue'
import AxiosDemo from '@/views/AxiosDemo.vue'
import GroupAccount from '@/views/group/group-account/GroupAccount.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/user-acount-manager/system-account',
    name: 'userAccount',
    component: UserAccount
  },
  {
    path: '/user-acount-manager/admin-account',
    name: 'userAccount2',
    component: UserAccount2
  },
  {
    path: '/user-acount-manager/account-info',
    name: 'accountInfo',
    component: AccountInfo
  },
  {
    path: '/user-acount-manager/group-account',
    name: 'groupAccount',
    component: GroupAccount
  },
  {
    path: '/user-acount-manager/display-info',
    name: 'displayInfo',
    component: DisplayInfo
  },
  {
    path: '/calculation',
    name: 'axiosDemo',
    component: AxiosDemo
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue'),
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
